package com.redislock.aop.tool.schedule;

import com.redislock.aop.tool.annonation.RedisLockAnnotation;
import com.redislock.aop.tool.annonation.TimingIdentificationAnnotation;
import com.redislock.aop.tool.enums.RedisLockTypeEnum;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.util.concurrent.TimeUnit;

@Component
public class ScheduleTest {
    @Scheduled(cron = "50 * * * * ?")
    @TimingIdentificationAnnotation(flag = 1)
    @RedisLockAnnotation(typeEnum = RedisLockTypeEnum.TIMINGIDENTIFICATION,lockTime = 5,lockTimeUnit = TimeUnit.HOURS)
    public void test(){
        System.out.println("测试！");
    }
}
